Home
Color Switch
Recreation of a famous mobile Game.

Audio copyright issues might prevent the video from being played here, please visit the YouTube Link to view the video.

The project information is divided into the following sections.

What is it?

• It is a very basic windows-based clone of the mobile game, Color Switch (Play Store and App Store). It only consists of 1 level.
• It is a colour-based puzzle where the player has to match their ball's colour to the obstacles' in order to proceed. The obstacles keep moving and rotating to make the level more challenging.
• I have implemented the entirety of the project, using Unity Engine and C#.

Motivation

• The main motivation behind this project was learning. I wanted to learn how to replicate a well established game logic and mechanics. It also polished my implementation of click-based input and introduced me to particle systems in Unity.

Work Done

• Implemented the click-based input system. colour puzzle elements, and the gameplay physics.
• Created the main game loop, the particle systems, and the UI/UX of the game.

Code Example The ColliderChecker.cs file is responsible for dictating the collision logic. It shows the use of Unity APIs and also shows the drawbacks of my code from the start of my Unity learning. if(collider.transform.tag == "color change") { this.transform.parent.gameObject.GetComponent<PlayerColorManager>().ChangeColor(); Destroy(collider.gameObject); } if(collider.tag == "hurdle") { this.transform.parent.gameObject.GetComponent<PlayerGameplayManager>().CheckColorWithHurdle(collider); } if(collider.tag == "end") { GameObject.FindGameObjectWithTag("end crackers").GetComponent<EndCrackers>().Diwali(); GameObject.FindGameObjectWithTag("gameplay").GetComponent<Timer>().End(); } if(collider.tag == "star") { Destroy(collider.gameObject); this.transform.parent.gameObject.GetComponent<PlayerGameplayManager>().Score(); } Full Script (GitHub) This snippet can be clearly improved by implementing singleton managers (PlayerColorManager, PlayerGameplayManager), this will replace the expensive lookup command. Implementing the CompareTag method instead of string comparison and caching the frequently used references will also help with efficiency and reliability.
Photos Main Screen: Gameplay: Dead Screen: Win Screen:
More details can be provided upon request.

Repository Link